import request from '@/utils/request'

// 查询最近就医原因列表
export function listReasons(query) {
  return request({
    url: '/system/reasons/list',
    method: 'get',
    params: query
  })
}

// 查询最近就医原因详细
export function getReasons(medicalReasonsId) {
  return request({
    url: '/system/reasons/' + medicalReasonsId,
    method: 'get'
  })
}

// 新增最近就医原因
export function addReasons(data) {
  return request({
    url: '/system/reasons',
    method: 'post',
    data: data
  })
}

// 修改最近就医原因
export function updateReasons(data) {
  return request({
    url: '/system/reasons',
    method: 'put',
    data: data
  })
}

// 删除最近就医原因
export function delReasons(medicalReasonsId) {
  return request({
    url: '/system/reasons/' + medicalReasonsId,
    method: 'delete'
  })
}
